/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package persistencia;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author aridrobo
 */
@Entity
@Table(name = "Empleado")
@NamedQueries({
    @NamedQuery(name = "Empleado.findAll", query = "SELECT e FROM Empleado e"),
    @NamedQuery(name = "Empleado.findByIdEmpleado", query = "SELECT e FROM Empleado e WHERE e.idEmpleado = :idEmpleado"),
    @NamedQuery(name = "Empleado.findByNomEmpleado", query = "SELECT e FROM Empleado e WHERE e.nomEmpleado = :nomEmpleado"),
    @NamedQuery(name = "Empleado.findByApeEmpleado", query = "SELECT e FROM Empleado e WHERE e.apeEmpleado = :apeEmpleado"),
    @NamedQuery(name = "Empleado.findByIdDpto", query = "SELECT e FROM Empleado e WHERE e.idDpto = :idDpto"),
    @NamedQuery(name = "Empleado.findByCargo", query = "SELECT e FROM Empleado e WHERE e.cargo = :cargo"),
    @NamedQuery(name = "Empleado.findByDireccion", query = "SELECT e FROM Empleado e WHERE e.direccion = :direccion"),
    @NamedQuery(name = "Empleado.findByTelf", query = "SELECT e FROM Empleado e WHERE e.telf = :telf"),
    @NamedQuery(name = "Empleado.findByEmail", query = "SELECT e FROM Empleado e WHERE e.email = :email"),
    @NamedQuery(name = "Empleado.findByLogin", query = "SELECT e FROM Empleado e WHERE e.login = :login"),
    @NamedQuery(name = "Empleado.findByPass", query = "SELECT e FROM Empleado e WHERE e.pass = :pass")})
public class Empleado implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "idEmpleado", nullable = false)
    private Integer idEmpleado;
    @Basic(optional = false)
    @Column(name = "nomEmpleado", nullable = false, length = 50)
    private String nomEmpleado;
    @Basic(optional = false)
    @Column(name = "apeEmpleado", nullable = false, length = 50)
    private String apeEmpleado;
    @Basic(optional = false)
    @Column(name = "idDpto", nullable = false)
    private int idDpto;
    @Basic(optional = false)
    @Column(name = "cargo", nullable = false, length = 30)
    private String cargo;
    @Column(name = "direccion", length = 50)
    private String direccion;
    @Column(name = "telf", length = 7)
    private String telf;
    @Column(name = "email", length = 30)
    private String email;
    @Basic(optional = false)
    @Column(name = "login", nullable = false, length = 10)
    private String login;
    @Basic(optional = false)
    @Column(name = "pass", nullable = false, length = 30)
    private String pass;

    public Empleado() {
    }

    public Empleado(Integer idEmpleado) {
        this.idEmpleado = idEmpleado;
    }

    public Empleado(Integer idEmpleado, String nomEmpleado, String apeEmpleado, int idDpto, String cargo, String login, String pass) {
        this.idEmpleado = idEmpleado;
        this.nomEmpleado = nomEmpleado;
        this.apeEmpleado = apeEmpleado;
        this.idDpto = idDpto;
        this.cargo = cargo;
        this.login = login;
        this.pass = pass;
    }

    public Integer getIdEmpleado() {
        return idEmpleado;
    }

    public void setIdEmpleado(Integer idEmpleado) {
        this.idEmpleado = idEmpleado;
    }

    public String getNomEmpleado() {
        return nomEmpleado;
    }

    public void setNomEmpleado(String nomEmpleado) {
        this.nomEmpleado = nomEmpleado;
    }

    public String getApeEmpleado() {
        return apeEmpleado;
    }

    public void setApeEmpleado(String apeEmpleado) {
        this.apeEmpleado = apeEmpleado;
    }

    public int getIdDpto() {
        return idDpto;
    }

    public void setIdDpto(int idDpto) {
        this.idDpto = idDpto;
    }

    public String getCargo() {
        return cargo;
    }

    public void setCargo(String cargo) {
        this.cargo = cargo;
    }

    public String getDireccion() {
        return direccion;
    }

    public void setDireccion(String direccion) {
        this.direccion = direccion;
    }

    public String getTelf() {
        return telf;
    }

    public void setTelf(String telf) {
        this.telf = telf;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getLogin() {
        return login;
    }

    public void setLogin(String login) {
        this.login = login;
    }

    public String getPass() {
        return pass;
    }

    public void setPass(String pass) {
        this.pass = pass;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idEmpleado != null ? idEmpleado.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Empleado)) {
            return false;
        }
        Empleado other = (Empleado) object;
        if ((this.idEmpleado == null && other.idEmpleado != null) || (this.idEmpleado != null && !this.idEmpleado.equals(other.idEmpleado))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "persistencia.Empleado[idEmpleado=" + idEmpleado + "]";
    }

}
